﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NovoSerDes.Funcs
{
    public class AddressMeditor
    {
        private string addr;

        public event EventHandler<string> AddressChanged;

        public string Addrss
        {
            get { return addr; }
            set
            {
                if (addr != value)
                {
                    addr = value;
                    NotifyAddrssChanged(addr);
                }
            }
        }

        public void NotifyAddrssChanged(string newAddress)
        {
            AddressChanged?.Invoke(this, newAddress);
            Addrss = newAddress;
        }
    }
}
